export default {
    data:{
//        menuData:[
//            {imgSrc:"/common/icon/home.png",title:"首页",imgSrcActive:"/common/icon/home-active.png"},
//            {imgSrc:"/common/icon/study.png",title:"学习",imgSrcActive:"/common/icon/study-active.png"},
//            {imgSrc:"/common/icon/message.png",title:"消息",imgSrcActive:"/common/icon/message-active.png"},
//            {imgSrc:"/common/icon/my.png",title:"我的",imgSrcActive:"/common/icon/my-active.png"},
//            {imgSrc:"/common/icon/my.png",title:"我的",imgSrcActive:"/common/icon/my-active.png"}
//        ],
//        defaultIndex:0
    },
    change_bar(value){
        this.changeMenu()
        this.defaultIndex=value
    },
//    props只能父组件给子组件传递参数，子组件的参数不影响父组件
    props:{
        menuData:{
        default: [
            {imgSrc:"/common/icon/home.png",title:"首页",imgSrcActive:"/common/icon/home-active.png"},
            {imgSrc:"/common/icon/study.png",title:"学习",imgSrcActive:"/common/icon/study-active.png"},
            {imgSrc:"/common/icon/message.png",title:"消息",imgSrcActive:"/common/icon/message-active.png"},
            {imgSrc:"/common/icon/my.png",title:"我的",imgSrcActive:"/common/icon/my-active.png"},
            {imgSrc:"/common/icon/my.png",title:"我的",imgSrcActive:"/common/icon/my-active.png"}
        ],

        },
        defaultIndex: {
            default: 0,
        },
    },
    changeMenu(){
        this.$emit('eventType1', {text: '收到子组件参数'});
    }
}